<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>ModNoteClassify</title>

<script th:inline="javascript">    
	var ctx = [[@{/}]];  
	
	function queryAllModNoteClassify(){
		fetch(`${ctx}note/modNoteClassify/`,{
			method:"GET",
			headers:{
				Accept:"application/json;charset=UTF-8"
			}
		}).then(function(res){
			console.log(res);
			return res.json();
		}).then(function(res){
			console.log(res);
			document.getElementById("result").value = JSON.stringify(res);
		});
		
	}
	
	
	function saveModNoteClassify(){
		eval("var person = " + document.getElementById("personInfoForSave").value);
		fetch(`${ctx}note/modNoteClassify/`,{
			method:"POST",
			headers:{
				Accept:"application/json;charset=UTF-8",
				"Content-Type":"application/json;charset=UTF-8"
			},
			body:JSON.stringify(person)
		}).then(function(res){
			console.log(res);
			return res.json();
		}).then(function(res){
			console.log(res);
			document.getElementById("result").value = JSON.stringify(res);
		});
	}
	
	
	function updateModNoteClassify(){
		eval("var person = " + document.getElementById("personInfoForUpdate").value);
		fetch(`${ctx}note/modNoteClassify/`,{
			method:"PUT",
			headers:{
				Accept:"application/json;charset=UTF-8",
				"Content-Type":"application/json;charset=UTF-8"
			},
			body:JSON.stringify(person)
		}).then(function(res){
			console.log(res);
			return res.json();
		}).then(function(res){
			console.log(res);
			document.getElementById("result").value = JSON.stringify(res);
		});
	}
	
	function queryModNoteClassifyById(){
		var pid = document.getElementById("pid").value;
		fetch(`${ctx}note/modNoteClassify/${pid}`,{
			method:"GET",
			headers:{
				Accept:"application/json;charset=UTF-8"
			}
		}).then(function(res){
			console.log(res);
			return res.json();
		}).then(function(res){
			console.log(res);
			document.getElementById("result").value = JSON.stringify(res);
		});
	}
	
	
	function deleteModNoteClassifyById(){
		var pid = document.getElementById("pid").value;
		fetch(`${ctx}note/modNoteClassify/${pid}`,{
			method:"DELETE",
			headers:{
				Accept:"application/json;charset=UTF-8"
			}
		}).then(function(res){
			console.log(res);
			return res.json();
		}).then(function(res){
			console.log(res);
			document.getElementById("result").value = JSON.stringify(res);
		});
	}
</script>

</head>
<body id="body" >
    
<textarea id="result" style="width:100%;height:150px"></textarea>
<input type="button" value="查询列表" onclick="queryAllModNoteClassify()"/>
&nbsp;&nbsp;
|&nbsp;&nbsp;
输入ID<input type="text" id="pid" name="pid"/> 
<input type="button" value="根据ID查询" onclick="queryModNoteClassifyById()"/> 
<input type="button" value="根据ID删除" onclick="deleteModNoteClassifyById()"/>

 


<br/>
<table width="100%"> 
<tr>
	<td width="50%" align="right">
	<textarea id="personInfoForSave" style="width:100%;height:120px">
{
"classifyId":"xx",
"classifyName":"CLASSIFY_NAME",
"classifyTreeCode":"CLASSIFY_TREE_CODE",
"classifySort":"CLASSIFY_SORT",
"classifyMemo":"CLASSIFY_MEMO",
"isLeaf":"IS_LEAF",
"isDelete":"IS_DELETE",
"creTime":"CRE_TIME",
"creUser":"CRE_USER",
"modTime":"MOD_TIME",
"modUser":"MOD_USER"
}
</textarea><br/>
<input type="button" value="保存" onclick="saveModNoteClassify()"/><br/>
	</td>
	<td width="50%" align="right">

<textarea id="personInfoForUpdate" style="width:95%;height:120px">
{
"classifyId":"xx",
"classifyName":"CLASSIFY_NAME",
"classifyTreeCode":"CLASSIFY_TREE_CODE",
"classifySort":"CLASSIFY_SORT",
"classifyMemo":"CLASSIFY_MEMO",
"isLeaf":"IS_LEAF",
"isDelete":"IS_DELETE",
"creTime":"CRE_TIME",
"creUser":"CRE_USER",
"modTime":"MOD_TIME",
"modUser":"MOD_USER"
}
</textarea><br/>
<input type="button" value="修改实体" onclick="updateModNoteClassify()"/><br/>	
	</td>
<tr/>
<table>

</body>

</html>